<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue基础模板</title>
    <script src="../vue.js"></script>
    <style>
        .publish{
            width: 100px;
            height: 100px;
            transition: all 1s;
        }
        .skyblue{
            background-color: skyblue;
        }
        .red{
            background-color: red;
        }
        .r{
            transform: rotateZ(45deg);
        }
        .move{
            transform: translateX(700px) rotate(180deg)
            
        }
        .down{
            transform: translate(700px,200px) rotate(90deg)
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="publish" :class="background" ></div>
        <div class="publish" :class="background1" ></div>
        <div class="publish" :class="background" ></div>
        <div class="publish" :class="background1" ></div>
        <button @click="moveX">biuX</button>
        <button @click="moveY">biuY</button>
    </div>

    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    bgColor:'red',
                    background:{
                        skyblue:true,
                        r:true,
                        move:false,
                        down:false
                    },
                    background1:{
                        red:true,
                        r:false,
                        move:false,
                        down:false
                    }
                }
            },
            methods:{
                moveX(){
                    this.background1.move=!this.background1.move
                    this.background.move=!this.background.move
                },
                moveY(){
                    this.background1.down=!this.background1.down
                    this.background.down=!this.background.down
                }
            }
        })
    </script>
</body>

</html>